﻿using System;
using System.Collections.Generic;

namespace YArchitech.MEP
{
	public class HYBranchResistanceComparer : IComparer<HYBranch>
	{
		public int Compare(HYBranch b1, HYBranch b2)
		{
			if (b1 == null)
			{
				if (b2 != null)
				{
					return 1;
				}
				return 0;
			}
			else
			{
				if (b2 != null)
				{
					return b2.Resistance.CompareTo(b1.Resistance);
				}
				return -1;
			}
		}
	}
}
